Install agents using Start Up Script

You are trying to install an agent. However, it fails. You are unable to install the agent even after following the resolutions provided. You see either of the following errors on the screen:

Each of the errors mentioned above can be solved using the resolutions provided in the respective knowledge base articles. However, if you cannot solve them you can use a script to install the agent manually.

Cause

The agents are installed remotely using the credentials of the administrator for a domain or that of a common administrator. These credentials are specified while adding a domain or workgroup. The installation may fail if a remote connection cannot be established.

Resolution

Steps for agent installation using startup script vary with respect to the version of the product you are currently using. Choose the options below to view the steps based on the Central Server version you have:

Run the script in multiple computers using the startup script of Active Directory

You can install an agent in your client computers using the startup script of the Active Directory. This is done by running a script in multiple computers adding the startup script of the Active Directory in your client computers.

To install agents in client computers using a GPO, follow the steps given below:

Note: Ensure that you complete the steps given below in a Domain Controller setting. You can map the script to a domain even If you have installed the agents in a few client computers. The script will install the agent only in the computers in which the agent is not installed.

  1. Download the Zipfile, extract it and follow the steps given below:
      1. Click the Agent tab
      2. In the Scope of Management section, click Computers
      3. Click Install Agent of the required office.

    Note: This can be a local office or a remote office depending on which computers you want to install agents in.

  • Save the .msi & .mst file in the network share that you have created.
  • Click Start>Run
  • Enter gpmc.msc
  • Click OK
  • Right-click the domain and select Create and Link a GPO here
  • Specify a name for the GPO
  • Select the GPO
  • Note: If you want to install the agent in only a few client computers, follow the steps given below. To install the agent in all your client computers skip these steps.
    1. Click the Scope tab
    2. In the Security Filtering section, click Add
    3. In the Select User, Computer, or Group dialog box, click Object Types
    4. Select specific computer object types
    5. Click OK
    6. Specify the computer names
    7. Click Check Names
    8. Click OK
  • Right-click the GPO and click Edit
  • Expand Computer Configuration>Policies>Windows Settings>Scripts
  • Right-click Startup and click Properties
  • Click Show Files
  • Drag and drop the InstallAgent.vbs (download the .txt file and rename it as .vbs) & UEMSAgent.msi UEMSAgent.mst to this location and Copy the location (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and close.
  • In the Startup Properties dialog box, click Add
  • Browse and navigate to the location (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup) and select the InstallAgent.vbs script
    or
    specify the path (copied location)and the script as mentioned below:
    (\\Domain name\SysVol\Domain name\Policies\{ID}\Machine\Scripts\Startup)\InstallAgent.vbs
  • specify the script parameters as mentioned below:
    UEMSAgent.msi UEMSAgent.mst
  • Click OK to close the Add a Script dialog box
  • Click OK to close the Startup Properties dialog box
  • Close the Group Policy Object Editor
  • Close the Group Policy Management dialog box

    Note: The script can be deployed to all the computers in the domain. It is to be noted that the target shouldn't be a user group.

The script will be executed when the client computers reboot next. After the execution of the script, the agent is automatically installed in all the client computers.

Notes

  • Set the file association properties of .vbs files to Microsoft Windows (r) based script host in all the client computers. This ensures that the script is executed successfully. Do not modify the file association properties to open in a text editor as the execution of the script will fail.
  • You can leave the group policy object settings installed unchanged, to ensure that the agent is installed in the client computers that join the domain in the future.
  • This will not re-install the agent that is already installed as the script is programmed to ensure that it doesn't re-install agents that are already installed. This will not cause any problems during startup.
  • You also do not need to update and download the UEMSAgent.msi file every time a new version is released. The agent is programmed to check for new versions from the server and upgrade itself automatically. When an agent is installed, it updates itself automatically when new versions are released.

    You have now installed an agent in client computers using a GPO.

    Configuring IP Scope will help you while you deploy agents using GPO
    • If IP scope is configured for all the remote offices created in central server, administrators can directly download local office UEMS_Agent.msi and deploy it in all remote offices using GPO.
    • IP scope has an automatic intelligence to detect computers within the specified IP range and reinstall the appropriate agent for the remote office.
    • To know about how to configure IP scope click here